// 封装LocalStorage 处理Token

const TOKEN_KEY = "geek-pc-token"

// 获取
export const getToken = () => localStorage.getItem(TOKEN_KEY)

export const setToken = token => localStorage.setItem(TOKEN_KEY, token)

export const removeToken = () => localStorage.removeItem(TOKEN_KEY)

// 判断是否有token
/**
 *
 * @returns token
 */
export const hasToken = () => !!getToken()
